home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / util / Collections$SynchronizedCollection.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  2.6 KB  |  115 lines

  1. package java.util;
  2.  
  3. import java.io.IOException;
  4. import java.io.ObjectOutputStream;
  5. import java.io.Serializable;
  6.  
  7. class Collections$SynchronizedCollection<E> implements Collection<E>, Serializable {
  8.    private static final long serialVersionUID = 3053995032091335093L;
  9.    // $FF: renamed from: c java.util.Collection
  10.    final Collection<E> field_0;
  11.    final Object mutex;
  12.  
  13.    Collections$SynchronizedCollection(Collection<E> var1) {
  14.       if (var1 == null) {
  15.          throw new NullPointerException();
  16.       } else {
  17.          this.field_0 = var1;
  18.          this.mutex = this;
  19.       }
  20.    }
  21.  
  22.    Collections$SynchronizedCollection(Collection<E> var1, Object var2) {
  23.       this.field_0 = var1;
  24.       this.mutex = var2;
  25.    }
  26.  
  27.    public int size() {
  28.       synchronized(this.mutex) {
  29.          return this.field_0.size();
  30.       }
  31.    }
  32.  
  33.    public boolean isEmpty() {
  34.       synchronized(this.mutex) {
  35.          return this.field_0.isEmpty();
  36.       }
  37.    }
  38.  
  39.    public boolean contains(Object var1) {
  40.       synchronized(this.mutex) {
  41.          return this.field_0.contains(var1);
  42.       }
  43.    }
  44.  
  45.    public Object[] toArray() {
  46.       synchronized(this.mutex) {
  47.          return this.field_0.toArray();
  48.       }
  49.    }
  50.  
  51.    public <T> T[] toArray(T[] var1) {
  52.       synchronized(this.mutex) {
  53.          return (T[])this.field_0.toArray(var1);
  54.       }
  55.    }
  56.  
  57.    public Iterator<E> iterator() {
  58.       return this.field_0.iterator();
  59.    }
  60.  
  61.    public boolean add(E var1) {
  62.       synchronized(this.mutex) {
  63.          return this.field_0.add(var1);
  64.       }
  65.    }
  66.  
  67.    public boolean remove(Object var1) {
  68.       synchronized(this.mutex) {
  69.          return this.field_0.remove(var1);
  70.       }
  71.    }
  72.  
  73.    public boolean containsAll(Collection<?> var1) {
  74.       synchronized(this.mutex) {
  75.          return this.field_0.containsAll(var1);
  76.       }
  77.    }
  78.  
  79.    public boolean addAll(Collection<? extends E> var1) {
  80.       synchronized(this.mutex) {
  81.          return this.field_0.addAll(var1);
  82.       }
  83.    }
  84.  
  85.    public boolean removeAll(Collection<?> var1) {
  86.       synchronized(this.mutex) {
  87.          return this.field_0.removeAll(var1);
  88.       }
  89.    }
  90.  
  91.    public boolean retainAll(Collection<?> var1) {
  92.       synchronized(this.mutex) {
  93.          return this.field_0.retainAll(var1);
  94.       }
  95.    }
  96.  
  97.    public void clear() {
  98.       synchronized(this.mutex) {
  99.          this.field_0.clear();
  100.       }
  101.    }
  102.  
  103.    public String toString() {
  104.       synchronized(this.mutex) {
  105.          return this.field_0.toString();
  106.       }
  107.    }
  108.  
  109.    private void writeObject(ObjectOutputStream var1) throws IOException {
  110.       synchronized(this.mutex) {
  111.          var1.defaultWriteObject();
  112.       }
  113.    }
  114. }
  115.